<?php

include("modules/members/global.php");

if($userloggedinarray[15]!=="administrator"){
   unset($tplcontent);
   $tplcontent['notice'].="Must be logged in as administrator to use control panel!";
   echo template('notice',$tplcontent);
}else{

 if(!$editconfig){
 unset($tplcontent);

 $tplcontent['formheader'].="<form action=\"admin_modules.php\" method=post>";
 $tplcontent['formheader'].="<input type=hidden name=\"module\" value=\"members\" size=40>";
 $tplcontent['formheader'].="<input type=hidden name=\"editconfig\" value=\"1\" size=40>";

 $tplcontent['usersperpage'].="<input type=text name=\"membersperpage\" value=\"$membersmoduleconfig[0]\" size=40 class=\"forminput\">";

 $tplcontent['submitbutton'].="<input type=submit name=\"submit\" value=\"Update\" size=40 class=\"formbutton\">";

 $tplcontent['formfooter'].="</form>";

 echo template('modules/members/membersadmin',$tplcontent);
 }

 if($editconfig){

 writedata("$configarray[20]/members/config.php",$membersperpage,0);

   unset($tplcontent);
   $tplcontent['notice'].="Members module config updated!";
   echo template('notice',$tplcontent);
 }

}

?>
